package com.example.validation.entity;


import com.example.validation.config.ValidateGroup;

import javax.validation.constraints.NotBlank;
/**
 * <p>
 * 用户表
 * </p>
 *
 * @author gjy
 * @since 2020-05-22
 */
public class User {

    private static final long serialVersionUID = 1L;

    private Long id;


    @NotBlank(message = "年龄不能为空",groups = ValidateGroup.insert.class)
    private String name;

    @NotBlank(message = "邮箱不能为空")
    private String email;

    @NotBlank(message = "昵称不能为空")
    private String nickName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
}